home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c,comp.lang.c++,comp.os.ms-windows.programmer.misc,comp.os.msdos.programmer,comp.programming
- Subject: Re: NMI Interrupt Handler Code Needed
- Date: 22 Feb 1996 10:51:24 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4gidvcINNo6@keats.ugrad.cs.ubc.ca>
- References: <4g18qj$640@tracy.protocom.com>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4g18qj$640@tracy.protocom.com>,
- Michael J. Karas <mkaras@pclink.com> wrote:
- >I would be interested if anyone out there has a code snippet in
- >C or assembler for an interrupt handler for a PC NMI interrupt. I have
-
- Interrupt handlers are beyond the scope of the C language. At least some
- portion of an interrupt handler is usually done in assembly language. A handler
- must preserve the machine context (things like registers, flags and the
- like)---objects to which access from the C language is not standardized.
-
- The assembly-language handler can set up the right conditions so that a C
- service routine can be called, perhaps with relevant parameters.
-
- >to program an ISA bus adapter card that generates an NMI interrupt on
- >the BUS line (IO_CHAN_CHK) to the CPU. This adapter generates the
- >interrupt condition at the time that a watch dog timer expires,
- >presumably at a time that a glitch has caused a software crash. Any help
- >would be appreciated.
-
- This is a very architecture-specific question. You might be able to get good
- answers on comp.lang.asm.x86. I don't know what OS you are writing under (or
- whether you are even using 32-bit code or not), so I'm hesitant to direct your
- to an MSDOS newsgroup, though I see you have cross-posted there already. If you
- use a real operating system, it probably has an NMI handler already, or it may
- let kernel-level modules install their own interrupt vectors through a special
- interface set up for that purpose.
- --
-
-